package models.spider.parser.aaa.json;

import java.util.ArrayList;
import java.util.List;

import models.spider.request.Request;

public class Document {
	
	public String         url       = null;
    public String         base      = null;
    public String         aaa       = null;
    public List<Resource> resources = new ArrayList<Resource>();
    
    public Document(Request request) {
    	this.url=request.getUrl();
    	this.base=this.url.substring(0,this.url.lastIndexOf('/')+1);
    	Builder builder = new Builder();
    	this.resources.add(builder.parse(request.body().asText().trim()));
    }

}
